import React from 'react'
import { BrowserRouter as Router } from 'react-router-dom'
import RootRouter from './RootRouter'
import BetterLink from './BetterLink'
import './App.css'
export default function App() {
    return (
        <Router>
            <nav>
                <BetterLink to={{ name: 'home' }}>首页</BetterLink>
                <BetterLink to={{ name: 'news' }}>新闻</BetterLink>
            </nav>
            <div>
                {/* 匹配顶级页面 */}
                <RootRouter />
            </div>
        </Router>
    )
}
